clc;clear;

V_phase = 66e3;

r = 0.5;

%insulating materials
eA = 4;
eB = 2.5;
eC = 4;

gA = 50e3;
gB = 30e3;
gC = 40e3;

%-------------------------------------------------------------

Var1 = eA*gA;
Var2 = eB*gB;
Var3 = eC*gC;

if Var1 > Var2 && Var1 > Var3
    Var_max = Var1;
    if Var2 > Var3
        Var_sec = Var2;
    else 
        Var_sec = Var3;
    end
end
  
if Var2 > Var1 && Var2 > Var3
    Var_max = Var2;
    if Var1 > Var3
        Var_sec = Var1;
    else 
        Var_sec = Var3;
    end
end

if Var3 > Var2 && Var3 > Var1
    Var_max = Var3;
    if Var1 > Var2
        Var_sec = Var1;
    else 
        Var_sec = Var2;
    end
end



syms r2
Equ1 = eA*r*gA == eB*r2*gB;
r1 = eval(solve(Equ1,r2));

syms r3
Equ2 = eA*r*gA == eC*r3*gC;
r2 = eval(solve(Equ2,r3));

if r1 > r2
    rtemp = r2;
    r2 = r1;
    r1 = rtemp;
end

Equ3 = V_phase == gA*r*log()
